/**
 * Witontek.com.
 * Copyright (c) 2012-2018 All Rights Reserved.
 */
package pattern.observer;

/**
 * 
 * @author Long
 * @version $Id: BinaryObserver.java, v 0.1 2018年1月15日 上午10:38:53  xiaolong.ma  Exp $
 */
public class BinaryObserver extends Observer {
    public BinaryObserver(Subject subject) {
        this.subject = subject;
        this.subject.attach(this);
    }

    @Override
    public void update() {
        System.out.println("Binary String: " + Integer.toBinaryString(subject.getState()));
    }
}
